jQuery(document).ready( function(){

  jQuery('a[data-delete="true"]').on('click', function() {
    var ret = (confirm("This action will delete "+
                       jQuery(this).data("projectname")+
                       " forever. Are you sure?"));
    
    if (ret == true) {
      jQuery.blockUI({ 
        message: 
          "We are deleting " + jQuery(this).data("projectname") + 
          ", please wait a minute"
        ,
        css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#000', 
            '-webkit-border-radius': '10px', 
            '-moz-border-radius': '10px', 
            opacity: .5, 
            color: '#fff' 
        }
      });
    }
    return ret;
  }); // delete

  jQuery('a[data-leave="true"]').on('click',function () {
    var confirmed = confirm("Do you really want to leave this project?");
    if (confirmed) {
      return true;
    }
    else {
      return false;
    }
  });

}); //ready